package dao.impl;

import java.sql.SQLException;
import java.util.List;

import com.ibatis.sqlmap.client.SqlMapClient;

import module.WorkSchedule;
import dao.ABSBasicDAO;
import domain.vo.queryObject;

public class WorkScheduleDAOImpl  extends ABSBasicDAO<WorkSchedule>{

	/**
	 * 
	* <p>Title: </p> 
	* <p>Description: 构造方法</p> 
	* @param sqlMapClient
	 */
	public WorkScheduleDAOImpl(SqlMapClient sqlMapClient) {
		super(sqlMapClient);
	}

	/* (非 Javadoc) 
	* <p>Title: getById</p> 
	* <p>Description: </p> 
	* @param id
	* @return
	* @throws SQLException 
	* @see dao.ABSBasicDAO#getById(java.lang.String) 
	*/
	@Override
	public WorkSchedule getById(String id) throws SQLException {
		return (WorkSchedule)sqlMapClient.queryForObject("WorkSchedule.getById");
	}

	/* (非 Javadoc) 
	* <p>Title: insertT</p> 
	* <p>Description: </p> 
	* @param t
	* @throws SQLException 
	* @see dao.ABSBasicDAO#insertT(java.lang.Object) 
	*/
	@Override
	public void insertT(WorkSchedule t) throws SQLException {
		sqlMapClient.insert("WorkSchedule.insertWorkScheduleInfo", t);
	}

	/* (非 Javadoc) 
	* <p>Title: getObjectByQueryObject</p> 
	* <p>Description: </p> 
	* @param queryObject
	* @return
	* @throws SQLException 
	* @see dao.ABSBasicDAO#getObjectByQueryObject(domain.vo.queryObject) 
	*/
	@Override
	public List<WorkSchedule> getObjectByQueryObject(queryObject queryObject)
			throws SQLException {
		return (List<WorkSchedule>)sqlMapClient.queryForList("WorkSchedule.getWSByQueryObject",queryObject);
	}

	/* (非 Javadoc) 
	* <p>Title: countByQueryObject</p> 
	* <p>Description: </p> 
	* @param queryObject
	* @return
	* @throws SQLException 
	* @see dao.ABSBasicDAO#countByQueryObject(domain.vo.queryObject) 
	*/
	@Override
	public int countByQueryObject(queryObject queryObject) throws SQLException {
		return (Integer)sqlMapClient.queryForObject("WorkSchedule.countWSByQueryObject",queryObject);
	}
	
	

}
